﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SDT.Admin.ViewModels.ReportViewModel>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Thống kê
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<form method="post" action="" name="adminForm">
    <table width="100%">
        <tr>
            <td align="left">
                Từ <%= Html.TextBox("fromDate", (Model.FromDate != DateTime.MinValue && Model.FromDate !=null)? Model.FromDate.ToString("dd/MM/yyyy") : "", new { @class = "datepicker", style = "width:80px" })%> đến <%= Html.TextBox("toDate", (Model.ToDate != DateTime.MinValue && Model.ToDate != null) ? Model.ToDate.ToString("dd/MM/yyyy") : "", new { @class = "datepicker", style = "width:80px" })%>
                <%= Html.ActionImageJS("Tìm kiếm", "icon-32-search.png", "document.adminForm.submit();", false)%>
            </td>
        </tr>
    </table>
</form>
<fieldset>
    <legend>Sản phẩm</legend>
<table width="100%" class="adminlist">   
    <tr>
        <th style="text-align:center">Tổng số</th>
        <th style="text-align:center">Chưa xuất bản (kích hoạt)</th>
        <th style="text-align:center">Đã xuất bản</th>
        <th style="text-align:center">Nổi bật</th>
    </tr>    
    <tr>
        <td style="text-align:center"><%=Html.ActionLink(Model.TotalProducts.ToString(), "Index", "Product")%></td>
        <td style="text-align:center"><%=Model.TotalProductsNotActive%></td>
        <td style="text-align:center"><%=Model.TotalProducts - Model.TotalProductsNotActive%></td>
        <td style="text-align:center"><%=Model.TotalProductsVip1%></td>
    </tr>
</table>
</fieldset>
<fieldset>
    <legend>Hỏi đáp</legend>
    <table width="100%" class="adminlist">    
        <tr>
            <th style="text-align:center">Tổng số</th>
            <th style="text-align:center">Chưa xuất bản (kích hoạt)</th>
            <th style="text-align:center">Chưa trả lời</th>
            <th style="text-align:center">Tổng số câu trả lời chưa kích hoạt</th>
        </tr>
        <tr>
            <td style="text-align:center"><%=Html.ActionLink(Model.TotalQuestions.ToString(), "Index", "Question")%></td>
            <td style="text-align:center"><%=Model.TotalQuestionsNotActive%></td>
            <td style="text-align:center"><%=Model.TotalQuestionsNotAnswer%></td>
            <td style="text-align:center"><%=Model.TotalAnswerNotActive%></td>
        </tr>
    </table>
</fieldset>

<fieldset>
    <legend>Thành viên</legend>

    <table width="100%" class="adminlist">        
        <tr>
            <th style="text-align:center">Tổng số</th>
            <th style="text-align:center">Bị khóa</th>
        </tr>
        <tr>
            <td style="text-align:center"><%=Html.ActionLink(Model.TotalUsers.ToString(), "Index", "UserAdministration")%></td>
            <td style="text-align:center"><%=Model.TotalUsersLocked%></td>
        </tr>
    </table>
</fieldset>
 <script type="text/javascript">
    $(document).ready(function() {
        $.datepicker.setDefaults($.datepicker.regional['vi']);
        $(".datepicker").datepicker({
            dateFormat: "dd/mm/yy",
            changeMonth: true,
            showOn: "button",
            buttonImage: "/Images/calendar.gif",
            buttonImageOnly: true,
            changeYear: true
        });
        $(".datepicker").mask("99/99/9999");
    });		
</script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
Thống kê
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
<%= ViewData["MessageInfo"] != null ? "<p class='perror'>" + Html.Encode(ViewData["MessageInfo"]) + "</p>" : string.Empty %>
</asp:Content>
